import TextWidget from './text-widget.js'
import {WIDGET_TYPE} from './widget-const.js';

export default class HTMLWidget extends TextWidget {
    constructor(sectionData, dispatcher) {
        super(sectionData, dispatcher);
    }

    get language() {return 'xml';}
    get sectionData() {
        this._sectionData.type = WIDGET_TYPE.HTML;
        return this._sectionData;
    }
    Init() {
        super.Init();
        this._editContainerElem.setAttribute('data-language', 'html');
        return this;
    }
    _UpdateView() {
        this._viewContainerElem.innerHTML = this.textareaText;
    }
};

